/* enum */
import ComponentNameEnum from '@model/enum/ComponentNameEnum'
/* hooks */
import { useProductSetting } from '@hooks/useProductSetting'
/* vue */
// @ts-ignore
import { ComponentInstance, ComponentRenderProxy, defineComponent, ComputedRef } from 'vue'
import { CommonComponentInstance } from '@model/VC'

export type QualityMixinProps = {

}

export interface QualityMixinSetupState {
  // 产品设置质保功能是否开启
  isOpenQuality: ComputedRef<boolean>
  // 产品设置质保功能是否显示
  // isOpenGrayQuality: ComputedRef<boolean>
}

export type QualityMixinInstance = ComponentInstance & QualityMixinSetupState
export type QualityMixinVM = ComponentRenderProxy<QualityMixinProps> & CommonComponentInstance

export default defineComponent<QualityMixinProps, QualityMixinSetupState>({
  name: ComponentNameEnum.QualityMixin,
  setup(props: QualityMixinProps, { emit }) {
    let [isOpenQuality] = useProductSetting()
    
    return {
      isOpenQuality,
      // isOpenGrayQuality
    }
  }
})
